#include "WidgetText.h"
#include "RessourceManager.h"

WidgetText::WidgetText(int x, int y, std::string str, sf::Color color, int textSize) : Widget(x,y)
{
    text.setPosition(x,y);
    text.setFont(*RessourceManager::getFont("font.ttf"));
    text.setString(str);
    text.setColor(color);
    text.setCharacterSize(textSize * 4 / 5);
}

void WidgetText::onRender(sf::RenderWindow* window)
{
    window->draw(text);
}

WidgetText::~WidgetText()
{
    //dtor
}
